{foreach name="form_data" item="val"}

{if condition="$val.config.is_delete == true || true"}
	{if condition="isset($val.config.addShow) && $val.config.addShow"}
			{php}continue;{/php}
	{/if}

	{if condition="$val['id'] == 'address'"}
	{php}continue;{/php}
	{/if}

{if condition="$val['id'] == 'role'"}
{php}continue;{/php}
{/if}


{if condition="$val['id'] == 'post'"}
{php}continue;{/php}
{/if}

		{eq name="val.component" value="input"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label for="c-{$val.id}">{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
			{if condition="$val.id eq 'num' && $val.config.label eq '订单编号' "}
				<input id="c-{$val.id}" data-type="{$val.component}" value="{$contractNum}" class="form-control" {if condition="$val.config.required == true"}data-rule="required"{/if} placeholder="{$val.config.placeholder}" name="row[{$val.id}]" type="text">
			{elseif condition="$val.id eq 'number' && $val.config.label eq '回款编号' "}
			<input id="c-{$val.id}" data-type="{$val.component}" value="{$createNum}" class="form-control" {if condition="$val.config.required == true"}data-rule="required"{/if} placeholder="{$val.config.placeholder}" name="row[{$val.id}]" type="text">
			{else\}
			<input id="c-{$val.id}" data-type="{$val.component}" class="form-control" {if condition="$val.config.required == true"}data-rule="required"{/if} placeholder="{$val.config.placeholder}" name="row[{$val.id}]"
				   type="text" value="{$val.config.value|default=''}" >
			{/if}
		</div>
	</div>
	{/eq}

	{eq name="val.component" value="input-number"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label for="c-{$val.id}">{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
			<input id="c-{$val.id}" data-type="{$val.component}" value="{$val.config.value|default=''}" class="form-control"{if condition="$val.config.required == true"}data-rule="required"{/if} placeholder="{$val.config.placeholder}" name="row[{$val.id}]"
				   type="number">
		</div>
	</div>
	{/eq}
<!--金额-->
	{eq name="val.component" value="input-money"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label for="c-{$val.id}">{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
			<input id="c-{$val.id}" data-type="{$val.component}" value="{$val.config.value|default=''}" class="form-control"{if condition="$val.config.required == true"}data-rule="required"{/if} placeholder="{$val.config.placeholder}" name="row[{$val.id}]"
				   type="number">
		</div>
	</div>
	{/eq}
<!--	手机号-->
	{eq name="val.component" value="input-mobile"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label for="c-{$val.id}">{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
			<input id="c-{$val.id}" data-type="{$val.component}" value="{$val.config.value|default=''}" class="form-control"
				   {if condition="$val.config.required == true"}data-rule="required;mobile"{/if}
			placeholder="{$val.config.placeholder}" name="row[{$val.id}]" type="text">
		</div>
	</div>
	{/eq}
<!--邮箱-->
	{eq name="val.component" value="input-email"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label for="c-{$val.id}">{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
			<input id="c-{$val.id}" data-type="{$val.component}" value="{$val.config.value|default=''}" class="form-control"
				   {if condition="$val.config.required == true"}data-rule="required;email"{/if}
			placeholder="{$val.config.placeholder}" name="row[{$val.id}]" type="text">
		</div>
	</div>
	{/eq}
<!--编辑器-->
	{eq name="val.component" value="editor"}
	<div class="col-xs-12 col-sm-12">
		<div class="form-group col-sm-12">
			<label for="c-{$val.id}">{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
			<textarea id="c-{$val.id}" data-type="{$val.component}" class="form-control editor"{if condition="$val.config.required == true"}data-rule="required"{/if} rows="5" name="row[{$val.id}]"
			placeholder="{$val.config.placeholder}">{$val.config.value|default=''}</textarea>
		</div>
	</div>
	{/eq}
<!--开关-->
	{eq name="val.component" value="switch"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label for="c-{$val.id}">{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}
				{$val.config.label}:</label>
			<div class="form-control" style="border: 0">
				<input  id="c-{$val.id}" data-type="{$val.component}" name="row[{$val.id}]" type="hidden" value="0">
				<a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-{$val.id}" data-yes="1" data-no="0" >
					<i class='fa fa-toggle-on text-success {eq name="$val.config.value" value="0"}fa-flip-horizontal text-gray{/eq} fa-2x'></i>
				</a>
			</div>
		</div>
	</div>
	{/eq}
<!--文本-->
	{eq name="val.component" value="textarea"}
	<div class="col-xs-12 col-sm-12">
		<div class="form-group col-sm-12">
			<label for="c-{$val.id}">{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
			<textarea id="c-{$val.id}" data-type="{$val.component}" class="form-control"{if condition="$val.config.required == true"}data-rule="required"{/if} rows="5" name="row[{$val.id}]"
					  placeholder="{$val.config.placeholder}">{$val.config.value|default=''}</textarea>
		</div>
	</div>
	{/eq}

	{eq name="val.component" value="radio"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label >{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
			<div class="radio">
				{foreach name="val.config.content" item="vo"}
<!--				{$val.config.value|default=''}-->
				<label><input data-type="{$val.component}" name="row[{$val.id}]" type="radio" {if condition="isset($val.config.value)"}
							  {eq name="$val.config.value" value="$vo['value']" }checked{/eq}
					{/if} value="{$vo.value}"/> {$vo.value}</label>
				{/foreach}
			</div>

		</div>
	</div>
	{/eq}

	{eq name="val.component" value="checkbox"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label >{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
			<div class="checkbox">
				{foreach name="val.config.content" item="vo"}
				<label class="checkbox-inline"><input data-type="{$val.component}" name="row[{$val.id}][]" type="checkbox" {if condition="isset($val.config.value)"} {in name="$vo['value']" value="$val.config.value" }checked{/in}{/if} value="{$vo.value}"/>
					{$vo.value}</label>
				{/foreach}
			</div>

		</div>
	</div>
	{/eq}
	<!--省市区-->
	{eq name="val.component" value="Cascader"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label for="c-{$val.id}">{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
				<input id="c-{$val.id}" data-type="{$val.component}" {if condition="$val.config.required == true"}data-rule="required"{/if} class="form-control" data-toggle="city-picker" name="row[{$val.id}]" type="text"
					   value="{$val.config.value|default=''}"/>
		</div>
	</div>
	{/eq}
	<!--地理位置-->
	{eq name="val.component" value="location"}
		<div class="col-xs-12 col-sm-12">
			<div class="form-group col-sm-10">
				<label>{$val.config.label}:</label>
				<div class="input-group">
					<input  id="{$val.id}_text" data-type="{$val.component}"  placeholder="{$val.config.placeholder}" class="form-control" disabled type="text"/>
					<div class="input-group-addon no-border no-padding">
							<span><button type="button" data-lng="{$val.id}_lng" data-lat="{$val.id}_lat"
										  data-address="{$val.id}" class="btn btn-primary fachoose-map">
								<i class="fa fa-list"></i> {:__('Choose')}</button></span>
					</div>
				</div>
				<input id="{$val.id}_lng" data-type="{$val.component}" name="row[{$val.id}_lng]" type="hidden" value=""  >
				<input id="{$val.id}_lat" data-type="{$val.component}" name="row[{$val.id}_lat]" type="hidden" value=""  >
				<input id="{$val.id}" data-type="{$val.component}" name="row[{$val.id}]" type="hidden" value="{$val.config.value|default=''}"  >
			</div>
		</div>
	{/eq}
	<!--地图-->
	{eq name="val.component" value="map"}
		<div class="col-xs-12 col-sm-12">
			<div class="form-group col-sm-10">
				<label>{$val.config.label}:</label>
				<div class="input-group">
					<input  id="{$val.id}_text" data-type="{$val.component}"  placeholder="{$val.config.placeholder}" class="form-control" disabled type="text"/>
					<div class="input-group-addon no-border no-padding">
									<span><button type="button" data-lng="{$val.id}_lng" data-lat="{$val.id}_lat"
												  data-address="{$val.id}" class="btn btn-primary fachoose-map">
										<i class="fa fa-list"></i> {:__('Choose')}</button></span>
					</div>
				</div>
				<input id="{$val.id}_lng" data-type="{$val.component}" name="row[{$val.id}_lng]" type="hidden" value=""  >
				<input id="{$val.id}_lat" data-type="{$val.component}" name="row[{$val.id}_lat]" type="hidden" value=""  >
				<input id="{$val.id}" data-type="{$val.component}" name="row[{$val.id}]" type="hidden" value="{$val.config.value|default=''}"  >
			</div>
		</div>
	{/eq}
	<!--关联客户-->
	{eq name="val.component" value="customer"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label>{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
			<input type="hidden" data-type="{$val.component}" name="row[{$val.id}]"
				   {if condition="$val.config.required == true"}data-rule="required"{/if}  value="" >
			<div class="form-control">
				<a href="javascript:void(0)" class="r-select-customer" data-name="row[{$val.id}]"
				   data-url="qingdongams/customer/customer/index?isselect=1" >【请点击选择】</a>
			</div>
		</div>
	</div>
	{/eq}
	<!--关联联系人-->
	{eq name="val.component" value="contact"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label>{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
			<input type="hidden" data-type="{$val.component}" name="row[{$val.id}]"
				   {if condition="$val.config.required == true"}data-rule="required"{/if} value="" >
			<div class="form-control">
				<a href="javascript:void(0)" class="r-select-contacts" data-name="row[{$val.id}]"
				   data-url="qingdongams/customer/contacts/index?isselect=1" >【请点击选择】</a>
			</div>
		</div>
	</div>
	{/eq}
	<!--关联订单-->
	{eq name="val.component" value="contract"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label>{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
			<input type="hidden" data-type="{$val.component}" name="row[{$val.id}]"
				   {if condition="$val.config.required == true"}data-rule="required"{/if} value="" >
			<div class="form-control">
				<a href="javascript:void(0)" class="r-select-contract" data-name="row[{$val.id}]"
				   data-url="qingdongams/customer/contract/index?isselect=1" >【请点击选择】</a>
			</div>
		</div>
	</div>
	{/eq}
	<!--关联商机-->
	{eq name="val.component" value="business"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label>{if condition="$val.config.required == true"}
				<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
			<input type="hidden" data-type="{$val.component}" name="row[{$val.id}]"
				   {if condition="$val.config.required == true"}data-rule="required"{/if} value="" >
			<div class="form-control">
				<a href="javascript:void(0)" class="r-select-business" data-name="row[{$val.id}]"
				   data-url="qingdongams/customer/business/index?isselect=1" >【请点击选择】</a>
			</div>
		</div>
	</div>
	{/eq}
	<!--关联员工-->
	{eq name="val.component" value="staff"}
		<div class="col-xs-12 col-sm-6">
			<div class="form-group col-sm-10">
				<label for="c-{$val.id}">{if condition="$val.config.required == true"}
					<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
				<input id="c-{$val.id}" data-type="{$val.component}" {if condition="$val.config.required == true"}data-rule="required"{/if} class="form-control selectpage"
					   name="row[{$val.id}]" placeholder="请选择员工"
					   data-source="qingdongams/department/staff/index" type="text" value="">
			</div>
		</div>
	{/eq}


	<!--关联部门-->
	{eq name="val.component" value="jigou_id"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label for="c-{$val.id}">{if condition="$val.config.required == true"}
				<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
			<input id="c-{$val.id}" data-type="{$val.component}" {if condition="$val.config.required == true"}data-rule="required"{/if} class="form-control selectpage"
			name="row[{$val.id}]" placeholder="请选择部门" data-multiple="true" data-max-select-limit="1"
			data-source="qingdongams/jigou/index" type="text" value="">
		</div>
	</div>
	{/eq}


	<!--关联部门-->
	{eq name="val.component" value="department"}
		<div class="col-xs-12 col-sm-6">
			<div class="form-group col-sm-10">
				<label for="c-{$val.id}">{if condition="$val.config.required == true"}
					<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
				<input id="c-{$val.id}" data-type="{$val.component}" {if condition="$val.config.required == true"}data-rule="required"{/if} class="form-control selectpage"
					   name="row[{$val.id}]" placeholder="请选择部门" data-multiple="true" data-max-select-limit="1"
					   data-source="qingdongams/department/group/index" type="text" value="">
			</div>
		</div>
	{/eq}

	{eq name="val.component" value="select"}
	{if condition="$val['id'] == 'customer_type'"}
	<div class="col-xs-12 col-sm-6 hidden">
		<div class="form-group col-sm-10">
			<label for="c-{$val.id}">{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
			<select id="c-{$val.id}"  data-type="{$val.component}" {if condition="$val.config.required == true"}data-rule="required"{/if} class="form-control selectpicker" {if condition="isset($val.config.multiple) && $val.config.multiple == true"} name="row[{$val.id}][]" multiple="" {else\} name="row[{$val.id}]" {/if} data-live-search='true'>
				<option value="">请选择</option>
				{foreach name="val.config.content" item="vo"}
				<option value="{$vo.label}" {if condition="isset($customer_type)"}
						{in name="$vo['value']" value="$customer_type" }selected{/in}
			{elseif condition="isset($val.config.value)"/}
			{in name="$customer_type" value="$val.config.value" }selected{/in}
			{/if}
			>{$vo.label}</option>
				{/foreach}

			</select>
		</div>
	</div>
	{else}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label for="c-{$val.id}">{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
			<select id="c-{$val.id}"  data-type="{$val.component}" {if condition="$val.config.required == true"}data-rule="required"{/if} class="form-control selectpicker" {if condition="isset($val.config.multiple) && $val.config.multiple == true"} name="row[{$val.id}][]" multiple="" {else\} name="row[{$val.id}]" {/if} data-live-search='true'>
			<option value="">请选择</option>
			{foreach name="val.config.content" item="vo"}
			<option value="{$vo.label}" {if condition="isset($val.config.value)"}
					{in name="$vo['value']" value="$val.config.value" }selected{/in}
			{/if}>{$vo.label}</option>
			{/foreach}

			</select>
		</div>
	</div>
	{/if}


	{/eq}

	{eq name="val.component" value="TimePicker"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label for="c-{$val.id}">{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>

			<input id="c-{$val.id}" data-type="{$val.component}" {if condition="$val.config.required == true"}data-rule="required"{/if} class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
				   placeholder="{$val.config.placeholder}" name="row[{$val.id}]"
			value="{$val.config.value|default=''}" type="text">
		</div>
	</div>
	{/eq}

	{eq name="val.component" value="DatePicker"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label for="c-{$val.id}">{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>

			<input id="c-{$val.id}" data-type="{$val.component}" {if condition="$val.config.required == true"}data-rule="required"{/if} class="form-control datetimepicker" data-date-format="YYYY-MM-DD" placeholder="{$val.config.placeholder}"
				   name="row[{$val.id}]" value="{$val.config.value|default=''}" type="text">
		</div>
	</div>
	{/eq}
	<!--星级-->
	{eq name="val.component" value="Rate"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label for="c-{$val.id}">{$val.config.label}:</label>
			<select id="c-{$val.id}" data-type="{$val.component}" name="row[{$val.id}]" class="form-control">
				{if condition="isset($val.config.value)"}
				<option value="5" {eq name="$val.config.value" value="5" }selected{/eq} >5</option>
				<option value="4" {eq name="$val.config.value" value="4" }selected{/eq} >4</option>
				<option value="3" {eq name="$val.config.value" value="3" }selected{/eq} >3</option>
				<option value="2" {eq name="$val.config.value" value="2" }selected{/eq} >2</option>
				<option value="1" {eq name="$val.config.value" value="1" }selected{/eq} >1</option>
				{else/}
				<option value="5">5</option>
				<option value="4">4</option>
				<option value="3">3</option>
				<option value="2">2</option>
				<option value="1">1</option>
				{/if}
			</select>

		</div>
	</div>
	{/eq}

	{eq name="val.component" value="uploadImage"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label for="c-{$val.id}">{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
			<div class="input-group">
				<input id="p-{$val.id}" class="form-control" placeholder="{$val.config.placeholder}" size="35" name="row[{$val.id}]" type="text" value="" {if condition="$val.config.required == true"}data-rule="required"{/if}>
				<div class="input-group-addon no-border no-padding">
						<span><button type="button" class="btn btn-danger faupload"
									  data-resize-quality="0.8"
									  data-resize-width="1024"
									  data-resize-height="768"
									  data-input-id="p-{$val.id}"
									  data-ids="{$val.id}"
									  data-url="qingdongams/base/upload"
									  data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
									  data-multiple="true" data-preview-id="c-{$val.id}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>

				</div>
				<span class="msg-box n-right"></span>
			</div>
			<ul class="row list-inline faupload-preview" id="c-{$val.id}" data-id="{$val.id}"></ul>
		</div>
	</div>
	{/eq}

	{eq name="val.component" value="uploadFile"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label for="c-{$val.id}">{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
			<div class="input-group">
				<input id="p-{$val.id}" class="form-control" placeholder="{$val.config.placeholder}" size="35" name="row[{$val.id}]" type="text" value="" {if condition="$val.config.required == true"}data-rule="required"{/if}>
				<div class="input-group-addon no-border no-padding">
							<span><button type="button" class="btn btn-danger faupload"
										  data-input-id="p-{$val.id}"
										  data-url="qingdongams/base/upload"
										  data-multiple="true" data-preview-id="c-{$val.id}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>

				</div>
				<span class="msg-box n-rightdata-pagination "></span>
			</div>
		</div>
	</div>
	{/eq}

	{eq name="val.component" value="label"}
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<label for="c-{$val.id}">{if condition="$val.config.required == true"}<span style="color:red;">*</span>{/if}{$val.config.label}:</label>
			<select id="c-{$val.id}" name="row[{$val.id}][]" class="form-control selectpicker" multiple="multiple" data-live-search="true">
				{foreach name="val.config.content" item="vo"}
				<option value="{$vo.value}" disabled>{$vo.label}</option>
					{foreach name="vo.children" item="children"}
					<option value="{$children.value}^{$children.color}" style="padding-left: 20px;color: {$children.color}">{$children.label}</option>
					{/foreach}
				{/foreach}
			</select>
		</div>
	</div>
	{/eq}
{/if}
{/foreach}